-
Notifications
You must be signed in to change notification settings - Fork 963
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add selector spread plugin #2500
Conversation
1cdb5f8
to
980e308
Compare
@@ -145,6 +148,9 @@ func calculateWeight(args framework.Arguments) priorityWeight { | |||
// Checks whether imagelocality.weight is provided or not, if given, modifies the value in weight struct. | |||
args.GetInt(&weight.imageLocalityWeight, ImageLocalityWeight) | |||
|
|||
// Checks whether selectorspread.weight is provided or not, if given, modifies the value in weight struct. | |||
args.GetInt(&weight.selectorSpreadWeight, ImageLocalityWeight) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why use ImageLocalityWeight in args.GetInt(&weight.selectorSpreadWeight, ImageLocalityWeight)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a copy-paste mistake 😿 , fixed.
df3c5ec
to
fc25fdc
Compare
0829bf6
to
d63ad50
Compare
54539a7
to
44e7645
Compare
44e7645
to
89d17bc
Compare
pkg/scheduler/cache/cache.go
Outdated
@@ -640,6 +640,13 @@ func newSchedulerCache(config *rest.Config, schedulerNames []string, defaultQueu | |||
UpdateFunc: sc.UpdateNumaInfoV1alpha1, | |||
DeleteFunc: sc.DeleteNumaInfoV1alpha1, | |||
}) | |||
// explictly register informers to the factory, otherwise resources listers cannot get anything | |||
// even with no erorr returned. | |||
informerFactory.Core().V1().Namespaces().Informer() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only selectorSpread plugin and topology spread plugin need below informer register?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The InterPodAffinity
plugin need the namespace
informer, SelectorSpread
and PodTopologySpread
needs the following four.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@elinx please merge the two commits to one.
done
@elinx please merge the two commits to one. |
89d17bc
to
06dbc64
Compare
- fix plugin use listers listing resource failed Signed-off-by: xilinxing <[email protected]>
06dbc64
to
9dc9914
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: william-wang The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
…add podTopologySpread plugin) conflict; Signed-off-by: shaoqiu <[email protected]>
also fix #2503